import unittest


class DemoTestCase(unittest.TestCase):
    # TODO 跳过
    @unittest.skip('跳过的原因')
    def test01(self):
        print('testo1')

    # TODO 条件达到跳过
    @unittest.skipIf(1 == 2, '跳过的原因')
    def test02(self):
        print('test02')

    # TODO 条件没有达到跳过
    @unittest.skipUnless(1 == 2, '跳过的原因')
    def test03(self):
        print('test03')

    # TODO 预期该测试为失败
    @unittest.expectedFailure
    def test04(self):
        self.assertEqual(1, 2, '断言失败')


if __name__ == '__main__':
    unittest.main(verbosity=2)
